home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / winver.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  9.3 KB  |  300 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * winver.h -    Version management functions, types, and definitions          *
  4. *                                                                             *
  5. *               Include file for VER.DLL.  This library is                    *
  6. *               designed to allow version stamping of Windows executable files*
  7. *               and of special .VER files for DOS executable files.           *
  8. *                                                                             *
  9. *          Copyright (c) 1993-1996, Microsoft Corp.  All rights reserved      *
  10. *                                                                             *
  11. \*****************************************************************************/
  12.  
  13. #ifndef VER_H
  14. #define VER_H
  15. #pragma option push -b
  16.  
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. /* ----- Symbols ----- */
  23. #define VS_FILE_INFO            RT_VERSION
  24. #define VS_VERSION_INFO         1
  25. #define VS_USER_DEFINED         100
  26.  
  27. /* ----- VS_VERSION.dwFileFlags ----- */
  28. #define VS_FFI_SIGNATURE        0xFEEF04BDL
  29. #define VS_FFI_STRUCVERSION     0x00010000L
  30. #define VS_FFI_FILEFLAGSMASK    0x0000003FL
  31.  
  32. /* ----- VS_VERSION.dwFileFlags ----- */
  33. #define VS_FF_DEBUG             0x00000001L
  34. #define VS_FF_PRERELEASE        0x00000002L
  35. #define VS_FF_PATCHED           0x00000004L
  36. #define VS_FF_PRIVATEBUILD      0x00000008L
  37. #define VS_FF_INFOINFERRED      0x00000010L
  38. #define VS_FF_SPECIALBUILD      0x00000020L
  39.  
  40. /* ----- VS_VERSION.dwFileOS ----- */
  41. #define VOS_UNKNOWN             0x00000000L
  42. #define VOS_DOS                 0x00010000L
  43. #define VOS_OS216               0x00020000L
  44. #define VOS_OS232               0x00030000L
  45. #define VOS_NT                  0x00040000L
  46.  
  47. #define VOS__BASE               0x00000000L
  48. #define VOS__WINDOWS16          0x00000001L
  49. #define VOS__PM16               0x00000002L
  50. #define VOS__PM32               0x00000003L
  51. #define VOS__WINDOWS32          0x00000004L
  52.  
  53. #define VOS_DOS_WINDOWS16       0x00010001L
  54. #define VOS_DOS_WINDOWS32       0x00010004L
  55. #define VOS_OS216_PM16          0x00020002L
  56. #define VOS_OS232_PM32          0x00030003L
  57. #define VOS_NT_WINDOWS32        0x00040004L
  58.  
  59. /* ----- VS_VERSION.dwFileType ----- */
  60. #define VFT_UNKNOWN             0x00000000L
  61. #define VFT_APP                 0x00000001L
  62. #define VFT_DLL                 0x00000002L
  63. #define VFT_DRV                 0x00000003L
  64. #define VFT_FONT                0x00000004L
  65. #define VFT_VXD                 0x00000005L
  66. #define VFT_STATIC_LIB          0x00000007L
  67.  
  68. /* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- */
  69. #define VFT2_UNKNOWN            0x00000000L
  70. #define VFT2_DRV_PRINTER        0x00000001L
  71. #define VFT2_DRV_KEYBOARD       0x00000002L
  72. #define VFT2_DRV_LANGUAGE       0x00000003L
  73. #define VFT2_DRV_DISPLAY        0x00000004L
  74. #define VFT2_DRV_MOUSE          0x00000005L
  75. #define VFT2_DRV_NETWORK        0x00000006L
  76. #define VFT2_DRV_SYSTEM         0x00000007L
  77. #define VFT2_DRV_INSTALLABLE    0x00000008L
  78. #define VFT2_DRV_SOUND          0x00000009L
  79. #define VFT2_DRV_COMM           0x0000000AL
  80. #define VFT2_DRV_INPUTMETHOD    0x0000000BL
  81.  
  82. /* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */
  83. #define VFT2_FONT_RASTER        0x00000001L
  84. #define VFT2_FONT_VECTOR        0x00000002L
  85. #define VFT2_FONT_TRUETYPE      0x00000003L
  86.  
  87. /* ----- VerFindFile() flags ----- */
  88. #define VFFF_ISSHAREDFILE       0x0001
  89.  
  90. #define VFF_CURNEDEST           0x0001
  91. #define VFF_FILEINUSE           0x0002
  92. #define VFF_BUFFTOOSMALL        0x0004
  93.  
  94. /* ----- VerInstallFile() flags ----- */
  95. #define VIFF_FORCEINSTALL       0x0001
  96. #define VIFF_DONTDELETEOLD      0x0002
  97.  
  98. #define VIF_TEMPFILE            0x00000001L
  99. #define VIF_MISMATCH            0x00000002L
  100. #define VIF_SRCOLD              0x00000004L
  101.  
  102. #define VIF_DIFFLANG            0x00000008L
  103. #define VIF_DIFFCODEPG          0x00000010L
  104. #define VIF_DIFFTYPE            0x00000020L
  105.  
  106. #define VIF_WRITEPROT           0x00000040L
  107. #define VIF_FILEINUSE           0x00000080L
  108. #define VIF_OUTOFSPACE          0x00000100L
  109. #define VIF_ACCESSVIOLATION     0x00000200L
  110. #define VIF_SHARINGVIOLATION    0x00000400L
  111. #define VIF_CANNOTCREATE        0x00000800L
  112. #define VIF_CANNOTDELETE        0x00001000L
  113. #define VIF_CANNOTRENAME        0x00002000L
  114. #define VIF_CANNOTDELETECUR     0x00004000L
  115. #define VIF_OUTOFMEMORY         0x00008000L
  116.  
  117. #define VIF_CANNOTREADSRC       0x00010000L
  118. #define VIF_CANNOTREADDST       0x00020000L
  119.  
  120. #define VIF_BUFFTOOSMALL        0x00040000L
  121.  
  122. #ifndef RC_INVOKED              /* RC doesn't need to see the rest of this */
  123.  
  124. /* ----- Types and structures ----- */
  125.  
  126. typedef struct tagVS_FIXEDFILEINFO
  127. {
  128.     DWORD   dwSignature;            /* e.g. 0xfeef04bd */
  129.     DWORD   dwStrucVersion;         /* e.g. 0x00000042 = "0.42" */
  130.     DWORD   dwFileVersionMS;        /* e.g. 0x00030075 = "3.75" */
  131.     DWORD   dwFileVersionLS;        /* e.g. 0x00000031 = "0.31" */
  132.     DWORD   dwProductVersionMS;     /* e.g. 0x00030010 = "3.10" */
  133.     DWORD   dwProductVersionLS;     /* e.g. 0x00000031 = "0.31" */
  134.     DWORD   dwFileFlagsMask;        /* = 0x3F for version "0.42" */
  135.     DWORD   dwFileFlags;            /* e.g. VFF_DEBUG | VFF_PRERELEASE */
  136.     DWORD   dwFileOS;               /* e.g. VOS_DOS_WINDOWS16 */
  137.     DWORD   dwFileType;             /* e.g. VFT_DRIVER */
  138.     DWORD   dwFileSubtype;          /* e.g. VFT2_DRV_KEYBOARD */
  139.     DWORD   dwFileDateMS;           /* e.g. 0 */
  140.     DWORD   dwFileDateLS;           /* e.g. 0 */
  141. } VS_FIXEDFILEINFO;
  142.  
  143. /* ----- Function prototypes ----- */
  144.  
  145. DWORD
  146. APIENTRY
  147. VerFindFileA(
  148.         DWORD uFlags,
  149.         LPSTR szFileName,
  150.         LPSTR szWinDir,
  151.         LPSTR szAppDir,
  152.         LPSTR szCurDir,
  153.         PUINT lpuCurDirLen,
  154.         LPSTR szDestDir,
  155.         PUINT lpuDestDirLen
  156.         );
  157. DWORD
  158. APIENTRY
  159. VerFindFileW(
  160.         DWORD uFlags,
  161.         LPWSTR szFileName,
  162.         LPWSTR szWinDir,
  163.         LPWSTR szAppDir,
  164.         LPWSTR szCurDir,
  165.         PUINT lpuCurDirLen,
  166.         LPWSTR szDestDir,
  167.         PUINT lpuDestDirLen
  168.         );
  169. #ifdef UNICODE
  170. #define VerFindFile  VerFindFileW
  171. #else
  172. #define VerFindFile  VerFindFileA
  173. #endif // !UNICODE
  174.  
  175. DWORD
  176. APIENTRY
  177. VerInstallFileA(
  178.         DWORD uFlags,
  179.         LPSTR szSrcFileName,
  180.         LPSTR szDestFileName,
  181.         LPSTR szSrcDir,
  182.         LPSTR szDestDir,
  183.         LPSTR szCurDir,
  184.         LPSTR szTmpFile,
  185.         PUINT lpuTmpFileLen
  186.         );
  187. DWORD
  188. APIENTRY
  189. VerInstallFileW(
  190.         DWORD uFlags,
  191.         LPWSTR szSrcFileName,
  192.         LPWSTR szDestFileName,
  193.         LPWSTR szSrcDir,
  194.         LPWSTR szDestDir,
  195.         LPWSTR szCurDir,
  196.         LPWSTR szTmpFile,
  197.         PUINT lpuTmpFileLen
  198.         );
  199. #ifdef UNICODE
  200. #define VerInstallFile  VerInstallFileW
  201. #else
  202. #define VerInstallFile  VerInstallFileA
  203. #endif // !UNICODE
  204.  
  205. /* Returns size of version info in bytes */
  206. DWORD
  207. APIENTRY
  208. GetFileVersionInfoSizeA(
  209.         LPSTR lptstrFilename, /* Filename of version stamped file */
  210.         LPDWORD lpdwHandle
  211.         );                      /* Information for use by GetFileVersionInfo */
  212. /* Returns size of version info in bytes */
  213. DWORD
  214. APIENTRY
  215. GetFileVersionInfoSizeW(
  216.         LPWSTR lptstrFilename, /* Filename of version stamped file */
  217.         LPDWORD lpdwHandle
  218.         );                      /* Information for use by GetFileVersionInfo */
  219. #ifdef UNICODE
  220. #define GetFileVersionInfoSize  GetFileVersionInfoSizeW
  221. #else
  222. #define GetFileVersionInfoSize  GetFileVersionInfoSizeA
  223. #endif // !UNICODE
  224.  
  225. /* Read version info into buffer */
  226. BOOL
  227. APIENTRY
  228. GetFileVersionInfoA(
  229.         LPSTR lptstrFilename, /* Filename of version stamped file */
  230.         DWORD dwHandle,         /* Information from GetFileVersionSize */
  231.         DWORD dwLen,            /* Length of buffer for info */
  232.         LPVOID lpData
  233.         );                      /* Buffer to place the data structure */
  234. /* Read version info into buffer */
  235. BOOL
  236. APIENTRY
  237. GetFileVersionInfoW(
  238.         LPWSTR lptstrFilename, /* Filename of version stamped file */
  239.         DWORD dwHandle,         /* Information from GetFileVersionSize */
  240.         DWORD dwLen,            /* Length of buffer for info */
  241.         LPVOID lpData
  242.         );                      /* Buffer to place the data structure */
  243. #ifdef UNICODE
  244. #define GetFileVersionInfo  GetFileVersionInfoW
  245. #else
  246. #define GetFileVersionInfo  GetFileVersionInfoA
  247. #endif // !UNICODE
  248.  
  249. DWORD
  250. APIENTRY
  251. VerLanguageNameA(
  252.         DWORD wLang,
  253.         LPSTR szLang,
  254.         DWORD nSize
  255.         );
  256. DWORD
  257. APIENTRY
  258. VerLanguageNameW(
  259.         DWORD wLang,
  260.         LPWSTR szLang,
  261.         DWORD nSize
  262.         );
  263. #ifdef UNICODE
  264. #define VerLanguageName  VerLanguageNameW
  265. #else
  266. #define VerLanguageName  VerLanguageNameA
  267. #endif // !UNICODE
  268.  
  269. BOOL
  270. APIENTRY
  271. VerQueryValueA(
  272.         const LPVOID pBlock,
  273.         LPSTR lpSubBlock,
  274.         LPVOID * lplpBuffer,
  275.         PUINT puLen
  276.         );
  277. BOOL
  278. APIENTRY
  279. VerQueryValueW(
  280.         const LPVOID pBlock,
  281.         LPWSTR lpSubBlock,
  282.         LPVOID * lplpBuffer,
  283.         PUINT puLen
  284.         );
  285. #ifdef UNICODE
  286. #define VerQueryValue  VerQueryValueW
  287. #else
  288. #define VerQueryValue  VerQueryValueA
  289. #endif // !UNICODE
  290.  
  291. #endif  /* !RC_INVOKED */
  292.  
  293. #ifdef __cplusplus
  294. }
  295. #endif
  296.  
  297.  
  298. #pragma option pop
  299. #endif  /* !VER_H */
  300.